<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>HTML DOM</title>
</head>

<body>
    <a id="aa" class="bb" href="8-1.html" target="_blank">跳转</a>
    
    <script>
	    var attrName = document.getElementById('aa');

	    attrName.getAttribute("id");
	    attrName.getAttribute("class");
	    attrName.getAttribute("href");
	    attrName.getAttribute("traget");
    </script>
</body>

</html>